package com.example.demo.controller;

import com.example.demo.dao.LiaoDao;
import com.example.demo.dao.NoticeDao;
import com.example.demo.dao.ZhanQuDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@CrossOrigin
public class LiaoController {
    @Autowired
    LiaoDao lIaoDao;

    @PostMapping("/count_all_liao")
    public long count_all_liao(@RequestBody Map map){
        return lIaoDao.count_all_liao(map);
    }
    @PostMapping("/upd_liao")
    public int upd_liao(@RequestBody Map map){
        return lIaoDao.upd_liao(map);
    }
    @PostMapping("/del_liao")
    public int del_liao(@RequestBody Map map){
        return lIaoDao.del_liao(map);
    }

    @PostMapping("/add_liao")
    public int add_liao(@RequestBody Map map){
        return lIaoDao.add_liao(map);
    }

    @PostMapping("/find_all_liao")
    public List<Map> find_all_liao(@RequestBody Map map) throws InterruptedException {

        return lIaoDao.find_all_liao(map);
    }
}
